
package com.nhjf.service.impl.teachers;
 
 

 

import org.springframework.beans.factory.annotation.Autowired;
 

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.nhjf.dao.teachers.OrganizationHasStudentDao;
 

import com.nhjf.model.teachers.OrganizationHasStudent;
 

import com.nhjf.pojo.qo.teachers.OrganizationHasStudentQo;
 

import com.nhjf.service.impl.BaseServiceImpl;
 

import com.nhjf.service.teachers.OrganizationHasStudentService;
 

@Service("ogsService")
@Transactional
public class OrganizationHasStudentServiceImpl extends BaseServiceImpl<OrganizationHasStudent, OrganizationHasStudentQo, OrganizationHasStudentDao> implements OrganizationHasStudentService{

	@Autowired
	private OrganizationHasStudentDao dao;
	@Override
	protected OrganizationHasStudentDao getDao() {
		// TODO Autogenerated method stub
		return dao;
	}
	@Override
	public int ohsAdd(OrganizationHasStudent hasStudent) {
		// TODO Auto-generated method stub
		
		if(hasStudent.getOrganization()==null ) {
			return 0;
		} 
		if(hasStudent.getStudent()==null) {
			return 0;
		}
		dao.save(hasStudent);
		return 1;
	}
}